Field of the Invention
The present invention relates to an image processing apparatus and an image processing method which develop photographed data, as well as a recording medium, and in particular to an image processing apparatus and an image processing method which are capable of reflecting a dynamic range in photographed data on developed image data, as well as a recording medium.
Description of the Related Art
Conventionally, to develop photographed data, so-called white balance adjustments are made in which color signals are adjusted with consideration given to characteristics and photographing conditions of an image pickup apparatus which has obtained the photographed data. As a result of the white balance adjustments, for example, a gray subject is developed in gray with saturation levels of respective color signals being uniform.
However, when saturation levels of respective color signals are different even after white balance adjustments are made, no additional white balance adjustments can be performed, and hence so-called coloring may occur in a high-luminance region of an image.
For this reason, there is a method in which a clip level is set according to a saturation level of an R color signal before or after white balance adjustments, and G and B color signals after white balance adjustments are subjected to clipping at that clip level (see Japanese Laid-Open Patent Publication (Kokai) No. 2000-13808).
Also, there is a method in which whether or not each color signal has become saturated is determined after white balance adjustments, and a color signal determined to be in saturation is corrected according to saturation levels of color signals other than the color signal (see Japanese Laid-Open Patent Publication (Kokai) No. 2004-328564).
Further, there is a method in which among color signals after white balance corrections, pixels which will have blown out highlights unless they are corrected to be underexposed (desensitizing process) are detected and corrected so that their pixel values can be increased, and thereafter, a desensitizing process is carried out using a maximum exposure correction value at which information is restorable (see Japanese Laid-Open Patent Publication (Kokai) No. 2012-85360). Here, a maximum interpolation value is obtained from peripheral pixel values, and according to a pixel value of a pixel to be interpolated, this pixel value and the maximum interpolation value are mixed to obtain an interpolation value.
According to the method described in Japanese Laid-Open Patent Publication (Kokai) No. 2000-13808, however, information on color signals exceeding the clip level is lost, and as a result, the gradation of a high-luminance region cannot be expressed in a developing result.
Also, according to the method described in Japanese Laid-Open Patent Publication (Kokai) No. 2004-328564, corrections suited to saturation levels of color signals are insufficient. Namely, when a gradation in which color and luminance gradually change is developed, a tone jump in which a color signal greatly changes at a boundary between an unsaturated state and a saturated state may occur. As a result of correction using color signals with different saturation levels, coloring remains in a high-luminance region.
FIG. 14 is a diagram showing results obtained when corrections are made for a subject whose color ratio of color signals is greater than 1 in a conventional developing device.
FIG. 14 shows results obtained by correcting color signals using the method described in Japanese Laid-Open Patent Publication (Kokai) No. 2004-328564 above. In FIG. 14, the axis of abscissa indicates the signal value of a color signal to be corrected, and the axis of ordinate indicates output after correction (corrected output). The maximum value of the signal level of a color signal 40 is small, and a color signal value 41 represents an input maximum value of the color signal 40. An input maximum value of a color signal 42 is greater than that of the color signal 40. In the example shown in FIG. 14, the color ratio between the color signal 40 and the color signal 42 is 1:2, and the output of the color signal 42 after correction is twice as large as that of the color signal 40.
When the color signal 40 reaches the input maximum value 41, the color signal 40 is replaced with the color signal 42 to obtain a replacement result 43. On this occasion, in a subject whose color ratio is greater than 1, there is a difference between the color signal 40 and the color signal 42, and hence a tone jump occurs at a boundary between a pixel subjected to correction and a pixel not subjected to correction.
According to the method described in Japanese Laid-Open Patent Publication (Kokai) No. 2012-85360 above, interpolation is performed with no consideration given to an upper limit of a dynamic range. For this reason, when a color signal of which an input value is smaller than an input maximum value is interpolated at a maximum interpolation value greater than an upper limit of a dynamic range, an interpolation value may exceed the upper limit of the dynamic range. Namely, even if the upper limit is increased in an attempt to widen the dynamic range, a reverse phenomenon in which the dynamic range is narrowed may occur.
On the other hand, Japanese Laid-Open Patent Publication (Kokai) No. 2012-85360 describes that although reversal of saturation in adjustment of a dynamic range is avoided by changing the shape of a gamma curve to a non-linear shape, the change of the gamma curve affects pixels and other color signals of which a maximum correction value is smaller than an input value (signal value) and which are not required to be interpolated, and as a result, distortion due to a non-linear change in output occurs.